﻿//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Workflow
//  File name:	ProcessDefinition.cs
//  Developer:	Solomatov Igor
//  Created:	16.04.2012
// 
//  -------------------- iSharePoint -------------------- //

namespace Smart.Workflow
{
	/// <remarks/>
	[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
	[System.SerializableAttribute]
	[System.Diagnostics.DebuggerStepThroughAttribute]
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	[System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
	public class Process
	{
		private object[] itemsField;

		private string nameField;

		private ProcessMode modeField;

		/// <remarks/>
		[System.Xml.Serialization.XmlElementAttribute("Assignment", typeof(Assignment), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
		[System.Xml.Serialization.XmlElementAttribute("Custom", typeof(Custom), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
		[System.Xml.Serialization.XmlElementAttribute("Pause", typeof(Pause), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
		[System.Xml.Serialization.XmlElementAttribute("Process", typeof(Process), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public object[] Items
		{
			get { return this.itemsField; }
			set { this.itemsField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string Name
		{
			get { return this.nameField; }
			set { this.nameField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public ProcessMode Mode
		{
			get { return this.modeField; }
			set { this.modeField = value; }
		}
	}

	/// <remarks/>
	[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
	[System.SerializableAttribute]
	[System.Diagnostics.DebuggerStepThroughAttribute]
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public class Assignment
	{
		private ActionRule[] itemsField;

		private string nameField;

		private string titleField;

		private TaskType taskTypeField;

		private string taskTitleField;

		private string taskDescriptionField;

		private string tasContentTypeIdField;

		private string principalNameField;

		private bool allowDelegationField;

		private bool allowSuspendingField;

		private string termField;

		private TermExpirationAction termExpirationActionField;

		private string termExpirationOutcomeField;

		public Assignment()
		{
			this.taskTypeField = TaskType.None;
			this.allowDelegationField = true;
			this.allowSuspendingField = true;
			this.termField = "P0D";
			this.termExpirationActionField = TermExpirationAction.Wait;
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlElementAttribute("ActionRule", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public ActionRule[] Items
		{
			get { return this.itemsField; }
			set { this.itemsField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string Name
		{
			get { return this.nameField; }
			set { this.nameField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string Title
		{
			get { return this.titleField; }
			set { this.titleField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		[System.ComponentModel.DefaultValueAttribute(TaskType.None)]
		public TaskType TaskType
		{
			get { return this.taskTypeField; }
			set { this.taskTypeField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string TaskTitle
		{
			get { return this.taskTitleField; }
			set { this.taskTitleField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string TaskDescription
		{
			get { return this.taskDescriptionField; }
			set { this.taskDescriptionField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string TaskContentTypeId
		{
			get { return this.tasContentTypeIdField; }
			set { this.tasContentTypeIdField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string PrincipalName
		{
			get { return this.principalNameField; }
			set { this.principalNameField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		[System.ComponentModel.DefaultValueAttribute(true)]
		public bool AllowDelegation
		{
			get { return this.allowDelegationField; }
			set { this.allowDelegationField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		[System.ComponentModel.DefaultValueAttribute(true)]
		public bool AllowSuspending
		{
			get { return this.allowSuspendingField; }
			set { this.allowSuspendingField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute(DataType = "duration")]
		[System.ComponentModel.DefaultValueAttribute("P0D")]
		public string Term
		{
			get { return this.termField; }
			set { this.termField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		[System.ComponentModel.DefaultValueAttribute(TermExpirationAction.Wait)]
		public TermExpirationAction TermExpirationAction
		{
			get { return this.termExpirationActionField; }
			set { this.termExpirationActionField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string TermExpirationOutcome
		{
			get { return this.termExpirationOutcomeField; }
			set { this.termExpirationOutcomeField = value; }
		}
	}

	/// <remarks/>
	[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
	[System.SerializableAttribute]
	[System.Diagnostics.DebuggerStepThroughAttribute]
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public class ActionRule
	{
		private string conditionField;

		private string actionField;

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string Condition
		{
			get { return this.conditionField; }
			set { this.conditionField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string Action
		{
			get { return this.actionField; }
			set { this.actionField = value; }
		}
	}

	/// <remarks/>
	[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
	[System.SerializableAttribute]
	[System.Diagnostics.DebuggerStepThroughAttribute]
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public class Pause
	{
		private string nameField;

		private string durationField;

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string Name
		{
			get { return this.nameField; }
			set { this.nameField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute(DataType = "duration")]
		public string Duration
		{
			get { return this.durationField; }
			set { this.durationField = value; }
		}
	}

	/// <remarks/>
	[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
	[System.SerializableAttribute]
	[System.Diagnostics.DebuggerStepThroughAttribute]
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public class Custom
	{
		private ActionRule[] itemsField;

		private string nameField;

		/// <remarks/>
		[System.Xml.Serialization.XmlElementAttribute("ActionRule", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
		public ActionRule[] Items
		{
			get { return this.itemsField; }
			set { this.itemsField = value; }
		}

		/// <remarks/>
		[System.Xml.Serialization.XmlAttributeAttribute]
		public string Name
		{
			get { return this.nameField; }
			set { this.nameField = value; }
		}
	}

	/// <remarks/>
	[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
	[System.SerializableAttribute]
	public enum TaskType
	{
		/// <remarks/>
		None,

		/// <remarks/>
		Read,

		/// <remarks/>
		Approve,

		/// <remarks/>
		Sign,

		/// <remarks/>
		Execute,
	}

	/// <remarks/>
	[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
	[System.SerializableAttribute]
	public enum TermExpirationAction
	{
		/// <remarks/>
		Autocomplete,

		/// <remarks/>
		Wait,
	}

	/// <remarks/>
	[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
	[System.SerializableAttribute]
	public enum ProcessMode
	{
		/// <remarks/>
		Parallel,

		/// <remarks/>
		Sequential,
	}
}